package com.kch.system.service.impl;

import com.kch.system.domain.AuthCode;
import com.kch.system.mapper.AuthCodeMapper;
import com.kch.system.service.AuthCodeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AuthCodeServiceImpl implements AuthCodeService {

    @Autowired
    private AuthCodeMapper authCodeMapper;

    @Override
    public List<AuthCode> selectAuthList() {
        return authCodeMapper.selectAuthList();
    }

    @Override
    public int deleteAuth(String id) {
        return authCodeMapper.deleteByPrimaryKey(Integer.valueOf(id));
    }

    @Override
    public int insertAuth(AuthCode authCode) {
        return authCodeMapper.insert(authCode);
    }
}
